//
//  WSManager+EntryPoints.m
//  mUBB
//
//  Created by Cosmin Stirbu on 1/15/13.
//  Copyright (c) 2013 Cosmin Stirbu. All rights reserved.
//

#import "WSManager+EntryPoints.h"
#import "EntryPointsHandler.h"
#import "ConfigurationManager.h"

@implementation WSManager (EntryPoints)

- (Ticket *)getEntryPointsWithDelegate:(id<EntryPointsProtocol>)delegate {
    // Ticket
    Ticket *ticket = [[Ticket alloc] initWithId:ticketId++];
    
    NSString *url = [[ConfigurationManager instance] applicationConfigValueForKey:WEB_SERVICE_ENTRY_POINT];
    
    // Create parser
    connectionDelegate = [[EntryPointsHandler alloc] initWithDelegate:delegate ticket:ticket];
    
    // Create Request
    [self getRequestWithUrl:url andHeaders:nil];
    
    connectionDelegate = nil;
    
    return  ticket;
}

@end
